package com.smartwebx.ha.dal.usebean;

import java.io.Serializable;
import java.util.Date;

import com.google.common.base.Objects;
import com.smartwebx.ha.dal.usebean.abstr.AbstractStation;
import com.smartwebx.ha.dal.usebean.abstr.AbstractTm;
import com.smartwebx.ha.dal.usebean.abstr.AbstractValue;

public class StatDateValue implements Serializable,AbstractStation,AbstractTm,AbstractValue {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String stcd;
	private Date tm;
	private Double val;

	public String getStcd() {
		return stcd;
	}

	public void setStcd(String stcd) {
		this.stcd = stcd;
	}

	public Date getTm() {
		return tm;
	}

	public void setTm(Date tm) {
		this.tm = tm;
	}

	public Double getVal() {
		return val;
	}

	public void setVal(Double val) {
		this.val = val;
	}

	@Override
	public int hashCode() {
		return Objects.hashCode(stcd, tm, val);
	}

	@Override
	public boolean equals(Object object) {
		if (object instanceof StatDateValue) {
			StatDateValue that = (StatDateValue) object;
			return Objects.equal(this.stcd, that.stcd)
					&& Objects.equal(this.tm, that.tm)
					&& Objects.equal(this.val, that.val);
		}
		return false;
	}

	@Override
	public String toString() {
		return Objects.toStringHelper(this).add("stcd", stcd).add("tm", tm)
				.add("val", val).toString();
	}

}
